import request from '@/utils/request'

// 查询任务前置表列表
export function listPresched(query) {
  return request({
    url: '/schedule/presched/list',
    method: 'get',
    params: query
  })
}

// 查询任务前置表详细
export function getPresched(taskId) {
  return request({
    url: '/schedule/presched/' + taskId,
    method: 'get'
  })
}

// 新增任务前置表
export function addPresched(data) {
  return request({
    url: '/schedule/presched',
    method: 'post',
    data: data
  })
}

// 修改任务前置表
export function updatePresched(data) {
  return request({
    url: '/schedule/presched',
    method: 'put',
    data: data
  })
}

// 删除任务前置表
export function delPresched(taskId) {
  return request({
    url: '/schedule/presched/' + taskId,
    method: 'delete'
  })
}
